package priv.mill.model;

import java.util.Date;
import java.util.List;

import javax.validation.constraints.Min;
import javax.validation.constraints.Pattern;

public class User {
	
	private List<String> books;

	public List<String> getBooks() {
		return books;
	}
	
	@Override
	public String toString() {
		return "User [books=" + books + ", userName=" + userName + ", password=" + password + ", userId=" + userId
				+ ", birthday=" + birthday + "]";
	}

	public void setBooks(List<String> books) {
		this.books = books;
	}
	private String userName;
	
	@Pattern(regexp = "\\w{6,15}")
	private String password;
	
	@Min(value=29,message="id不能小於29,太小没档次")
	private Integer userId;
	
	
	private Date birthday;
	
	public String getUserName() {
		return userName;
	}
	public void setUserName(String userName) {
		this.userName = userName;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	public Integer getUserId() {
		return userId;
	}
	public void setUserId(Integer userId) {
		this.userId = userId;
	}
	public Date getBirthday() {
		return birthday;
	}
	public void setBirthday(Date birthday) {
		this.birthday = birthday;
	}
	
	
	
}
